Skip to content

Find a catalog renamed outside the bundle by its id - #7418

Draft
denik wants to merge 13 commits into
denik/secrets-parent-renamefrom
denik/catalog-id
Draft

denik wants to merge 13 commits into
denik/secrets-parent-renamefrom
denik/catalog-id

Conversation

@denik

@denik denik commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Changes

A catalog renamed outside the bundle is now found by its id, like schemas and volumes are found by schema_id/volume_id in #7343. Before, the plan created it again under its new name, UC rejected the create with CATALOG_ALREADY_EXISTS on every deploy, and destroy left the catalog behind.

UC returns an id for every catalog: a UUID that a rename keeps and a recreate changes (checked on AWS, Azure and GCP). The API spec does not declare it, so the SDK's CatalogInfo drops it. The catalog adapter now makes the same calls the SDK makes, directly, decoding into CatalogInfo plus id; that includes the follow-up update that sets isolation_mode after a create. The state records the id, and internal_id_field: id lets the plan adopt the catalog only when its id matches. If UC ever stops returning the field, nothing is recorded and the plan falls back to today's behavior; it cannot adopt the wrong catalog. ${resources.catalogs.<c>.id} still resolves to the catalog name.

The test server returns an id for each catalog and keeps it across renames.

Stacked on #7381. Registered models and UC secrets return an id too, so the same lookup could fix their out-of-band Badness tests (registered_models/parent_rename_out_of_band, secrets/parent_rename_out_of_band).

Tests

  • catalogs/rename_out_of_band and catalogs/rename_all_out_of_band (Cloud = true): the plan now finds the catalog, the schema and the volume at their new names. The deploy sends no requests, destroy removes all three, and the Badness both tests had is gone.
  • Other catalog tests, and the model, secret and volume tests that create a catalog, show the recorded id, skipped in the plan with reason internal_id. catalogs/isolation_mode sends the same requests as before.
  • Unit test: the test server keeps a catalog's id across a rename.
  • Every catalog-using test with Cloud = true (14) passes locally and on AWS, GCP and Azure; the invariant suite passes locally.

This pull request and its description were written by Isaac.

@denik
denik added this pull request to stack #7411 November 9, 2026 20:38
@github-actions github-actions Bot added the DABs DABs related issues label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 68d90206a | Workflow run

Regression test report

Selected 20 changed tests (limit=20, 7 not selected)

53 tests: regression=45 unreleased=8 coverage=0 failing=0
test branch main (4c8b7a1) latest (v1.26.0)
TestAccept/bundle/migrate/auto/registered-model-rename/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/grants/registered_model_change_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/grants/registered_model_change_name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/basic/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/basic/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=/READPLAN= ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=/READPLAN=1 ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN= ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN=1 ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/parent_rename_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/parent_rename_out_of_band/DMS= ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/parent_rename_out_of_band/DMS=true ✅ ✅ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_to_existing_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_to_existing_name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_with_aliases/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_with_aliases/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_referenced_by_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_referenced_by_name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_then_change/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_then_change/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_model_and_secret/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_model_and_secret/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename_out_of_band/DMS= ✅ ✅ ❌
TestAccept/bundle/resources/secrets/parent_rename_out_of_band/DMS=true ✅ ✅ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/migrate/auto/registered-model-rename/DMS=: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌

main (4c8b7a1):

acceptance_test.go:1380: Diff:
        --- bundle/migrate/auto/registered-model-rename/output.txt
        +++ /tmp/TestAcceptbundlemigrateautoregistered-model-renameDMS=2894114118/002/output.txt
        @@ -6,15 +6,16 @@
         === Rename the model (an updatable id field) and deploy on direct
         
         >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy
        -Warn: migration to direct: registered_models.my_model: name differs between config ("themodel-[UNIQUE_NAME]-renamed") and terraform state ("themodel-[UNIQUE_NAME]"); this resource will be renamed.
        +Warn: migration to direct: registered_models.my_model: name differs between config ("themodel-[UNIQUE_NAME]-renamed") and terraform state ("themodel-[UNIQUE_NAME]"); this resource will be recreated.
         Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
         Migrated 2 resources to direct deployment engine.
        -Updated registered_models.my_model
        +Recreated registered_models.my_model
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 0 changed, 1 deleted, 1 unchanged
         
         >>> print_migration_telemetry
        +direct_migrate_recreate_planned true
         direct_migrated_via_env true
         
         === Redeploy on direct: the model now matches config, so the plan is a clean no-op

latest (v1.26.0): same output as main (4c8b7a1)

TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌

main (4c8b7a1):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=2904988125/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -86,6 +75,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -96,8 +86,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +104,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -231,9 +220,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -245,6 +233,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -267,7 +268,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_bmfmjispevfavlkqhgm5wp6u54.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_bmfmjispevfavlkqhgm5wp6u54.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_bmfmjispevfavlkqhgm5wp6u54.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_bmfmjispevfavlkqhgm5wp6u54",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=3881077824/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -96,8 +85,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +103,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -145,8 +133,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -164,17 +151,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -189,8 +167,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -211,17 +188,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -231,75 +199,21 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        ->>> [CLI] registered-models get test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        -}
        -
        -=== The state tracks the new paths
        -
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "registered_models": {
        -    "model1": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 4 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -319,3 +229,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 4 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_xmhnu65hingz7m5irsftnm65me.myschema.myvolume"
... (19 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌

main (4c8b7a1):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=1634676940/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -86,6 +75,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -96,8 +86,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +104,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -231,9 +220,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -245,6 +233,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -267,7 +268,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_ec63c4osrvgqhcyj53wnrq2ofq.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_ec63c4osrvgqhcyj53wnrq2ofq.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_ec63c4osrvgqhcyj53wnrq2ofq.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_ec63c4osrvgqhcyj53wnrq2ofq",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
FAIL

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=12723143466/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -96,8 +85,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +103,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -145,8 +133,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -164,17 +151,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -189,8 +167,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -211,17 +188,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -231,75 +199,21 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        ->>> [CLI] registered-models get test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        -}
        -
        -=== The state tracks the new paths
        -
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "registered_models": {
        -    "model1": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 4 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -319,3 +229,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 4 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_so6yxejmyrdnnebci7ouzvfgry.myschema.myvolume"
... (20 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌

main (4c8b7a1):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=1859635205/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -86,6 +75,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -96,8 +86,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +104,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -231,9 +220,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -245,6 +233,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -267,7 +268,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_spxcfimzvzgqbc7ncekzin4b3e.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_spxcfimzvzgqbc7ncekzin4b3e.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_spxcfimzvzgqbc7ncekzin4b3e.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_spxcfimzvzgqbc7ncekzin4b3e",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=3083630633/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -96,8 +85,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +103,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -145,8 +133,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -164,17 +151,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -189,8 +167,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -211,17 +188,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -231,75 +199,21 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        ->>> [CLI] registered-models get test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        -}
        -
        -=== The state tracks the new paths
        -
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "registered_models": {
        -    "model1": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 4 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -319,3 +229,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 4 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_lvfmwsdbmzasbfbb5bqiprr2o4.myschema.mymodel"
... (19 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌

main (4c8b7a1):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=11436684113/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -86,6 +75,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -96,8 +86,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +104,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -231,9 +220,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -245,6 +233,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -267,7 +268,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_22d4lsb7dfhnvkocfvvx4etr6e.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_22d4lsb7dfhnvkocfvvx4etr6e.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_22d4lsb7dfhnvkocfvvx4etr6e.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_22d4lsb7dfhnvkocfvvx4etr6e",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.26.0):

acceptance_test.go:1380: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=14149835154/002/output.txt
        @@ -65,17 +65,10 @@
               "catalog_type": "MANAGED_CATALOG",
               "created_by": "[USERNAME]",
               "full_name": "test_catalog_[UNIQUE_NAME]",
        -      "id": "[UUID]",
               "name": "test_catalog_[UNIQUE_NAME]",
               "owner": "[USERNAME]"
             },
             "changes": {
        -      "id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[UUID]",
        -        "remote": "[UUID]"
        -      },
               "name": {
                 "action": "update_id",
                 "reason": "id_changes",
        @@ -96,8 +85,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -115,8 +103,8 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        @@ -145,8 +133,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -164,17 +151,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -189,8 +167,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -211,17 +188,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -231,75 +199,21 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        ->>> [CLI] registered-models get test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        -}
        -
        -=== The state tracks the new paths
        -
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "registered_models": {
        -    "model1": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 4 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -319,3 +229,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 4 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1158: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_eyemm2rkorhufkk2euc4sv6ucm.myschema.myvolume"
... (19 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

48 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 68d9020

Run: 44093871988

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 345 23 31:29
💚​ aws-windows-latest-4core-16gb 1 347 21 34:19
🔄​ azure linux-2core-8gb 4 1 340 23 33:17
🔄​ azure-windows-latest-4core-16gb 6 1 340 21 40:54
🔄​ gcp linux-2core-8gb 4 1 341 23 34:47
💚​ gcp-windows-latest-4core-16gb 1 347 21 35:08
13 interesting tests: 12 flaky, 1 RECOVERED
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/catalogs/rename_all_out_of_band ✅​p ✅​p ✅​p 🔄​f 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=/READPLAN=1 ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true/READPLAN= ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/registered_model_change_name ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/grants/registered_model_change_name/DMS= ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/schemas/rename_then_change ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/schemas/rename_then_change/DMS= ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/secrets/parent_rename_out_of_band ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/secrets/parent_rename_out_of_band/DMS=true ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/secrets/recreate_in_renamed_schema ✅​p ✅​p 🔄​f ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=/READPLAN= ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true/READPLAN= ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
8:32 azure linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
8:02 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
7:27 aws linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
7:02 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
6:51 aws linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
6:37 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
6:34 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
6:31 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
5:55 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
4:33 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
4:31 aws-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=true/READPLAN=
4:24 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN=1
4:23 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=
4:19 azure linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=true
4:17 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
4:15 azure linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
4:08 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN=
3:59 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
3:58 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN=
3:57 aws-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
3:56 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=
3:52 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/comment_out_of_band/DMS=true
3:49 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN=
3:47 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN=1
3:46 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN=1
3:38 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN=1
3:36 aws linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=
3:35 aws-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true/READPLAN=1
3:31 aws-windows-latest-4core-16gb TestAccept
3:29 aws linux-2core-8gb TestAccept/bundle/resources/grants/catalogs/DMS=true
3:29 aws linux-2core-8gb TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=
3:19 gcp linux-2core-8gb TestAccept/bundle/resources/secrets/parent_rename/DMS=/READPLAN=1
3:18 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
3:14 aws-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=/READPLAN=1
3:13 azure-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true/READPLAN=
3:13 aws linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=true
3:12 gcp linux-2core-8gb TestAccept/bundle/resources/catalogs/comment_out_of_band/DMS=
3:11 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=
3:10 aws-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN=
3:10 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/volumes/rename_catalog_and_schema/DMS=/READPLAN=
3:07 aws-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN=1
3:07 gcp-windows-latest-4core-16gb TestAccept
3:05 aws-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=/READPLAN=
3:05 azure linux-2core-8gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN=
3:02 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/volumes/rename_catalog_and_schema/DMS=/READPLAN=1
3:01 aws-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=
2:58 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=true
2:56 azure linux-2core-8gb TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1
2:55 aws-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1
2:55 aws linux-2core-8gb TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=/READPLAN=1

idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 14, 2026
… or schema (databricks#7343)

## Changes
Changing a schema's `name` now renames it in place (`PATCH new_name`)
instead of deleting and recreating it, so the schema and its contents
survive.

UC moves the children of a renamed catalog or schema along with it. A
volume in a renamed schema, or a schema in a renamed catalog
(`schema_name`/`catalog_name: ${resources.<parent>.name}`), used to be
planned as a recreate, whose create then failed with
`RESOURCE_ALREADY_EXISTS` on every deploy. The planner now re-keys such
children (`update_id`, reason `parent_renamed`). Catalog rename was
already supported and had the same latent bug for child schemas.
- A child whose only change is following its parent is `state_only`: the
framework saves it under the ID the adapter's new optional `IDFromState`
gives it, with no request. It is left out of the text plan and counted
as unchanged. A child with its own changes too goes through
`DoUpdateWithID` at its new path.
- A child recreated in the same deploy as its parent's rename is deleted
where the rename moved it: the plan points the delete at the re-keyed ID
(the entry's `id`) and orders it after the parent, taken from the
state's `depends_on` because the config may now reference another one.
Before, the delete went to the old path and the moved volume was left
behind.
- Registered models and UC secrets cannot follow a rename until
databricks#7379 and
databricks#7381, so in a renamed schema they
are recreated where the rename moved them, as on main.

A resource can also be missing from its recorded ID with no rename in
the plan: a deploy stopped after renaming its parent, or it was renamed
out of band. The plan then reads it at the `IDFromState` ID and takes
what it finds only if its internal ID matches the recorded one, so a
different object under that name is never adopted; the plan entry's `id`
(declared, but never set until now) records where it is, and apply
addresses it there. If that read fails with anything but not-found, the
plan warns and goes on as before.
- The new `internal_id_field` lifecycle setting names the internal ID
(`schema_id`, `volume_id`). The framework records it from the remote
state on every save, and the plan skips it (reason `internal_id`).
- A state recorded without it (by an older CLI, or by `bind`) gets it
from a state-only update. Like a skip, it needs no confirmation in
`bind`, and references to it read the remote state. A migration from
terraform records it directly: `schema_id` from the terraform state,
`volume_id` from the remote (read by `bundle deployment migrate`, taken
from the plan check when migrating on deploy).
- With the new state fields, `apitypes.generated.yml` maps schemas and
volumes to `SchemaInfo`/`VolumeInfo`, as registered models already map
to their Info type.

The test server now looks a volume's full name up case-insensitively and
rejects a taken schema name, like UC. `state_present` and the
synced-table terraform fixture no longer create a schema twice. The
earlier test-server work is in
databricks#7408 (merged).

Known gaps, all as on main, recorded with `Badness`: destroy does not
look for a resource renamed out of band
(`schemas/destroy_after_rename_out_of_band`); the plan takes whatever is
at the recorded name without checking the internal ID
(`schemas/foreign_at_recorded_name`); a catalog renamed out of band is
not found (`catalogs/rename_out_of_band`, fixed by
databricks#7418). A parent named by a
literal rather than a reference is not followed, nor is one interpolated
into another field (a quality monitor's `table_name`).

With databricks#7345 and
databricks#7361 (merged), a renamed schema
keeps its grants and permissions in sync. Registered models and UC
secrets follow parent renames in
databricks#7379 and
databricks#7381.

## Tests
Acceptance tests marked `Cloud = true` pass locally and on AWS, GCP and
Azure.
- Renames, `Cloud = true`: `schemas/rename`,
`schemas/rename_with_volume`, `catalogs/rename` (catalog → schema →
volume), `volumes/rename_catalog_and_schema` (two parent renames at
once), `schemas/rename_with_volume_ref` (a job reading the volume's
`full_name`, `id`, `volume_id`), `schemas/rename_then_change` (update,
rename and recreate reach the new path, also after a second rename and a
rename back).
- Rename together with another change (one PATCH):
`schemas/rename_with_comment`, `catalogs/rename_with_comment`. Case-only
renames: `schemas/rename_case_only`, `volumes/rename_case_only` (UC
keeps the lowercase name; a re-key under a renamed schema keeps the
config's casing, which UC reads case-insensitively).
- Recreate during a parent rename: `volumes/move_from_renamed_schema`
(`Cloud = true`), `volumes/recreate_in_renamed_schema` (local only: an
external volume needs an external location),
`schemas/rename_with_model_and_secret` (`Cloud = true`).
- Out of band: `volumes/rename_out_of_band`,
`schemas/rename_out_of_band` (found by id, no requests),
`catalogs/rename_out_of_band`, `catalogs/rename_all_out_of_band`,
`volumes/recreate_out_of_band`, `schemas/recreate_out_of_band` (a
different id: created, not adopted),
`schemas/rename_out_of_band_old_state` (a state without the ids records
them, then follows the rename), `volumes/old_state_ref` (a job reading
the volume's fields stays unchanged while the ids are recorded).
`deployment/bind/volume` now binds without `--auto-approve`.
- Interrupted deploys (local only, kill hook):
`schemas/rename_interrupted`, `schemas/recreate_interrupted`. A failed
lookup read: `schemas/rename_probe_forbidden` (local only, injected
403).
- The key rename tests also deploy from a saved plan
(`EnvMatrix.READPLAN`).
- Migration: `migrate/command/{basic,grants}` record the ids; the
invariant `migrate` and `auto-migrate` targets show no drift.
`grants/schemas/change_name` and `migrate/auto/schema-rename` show the
in-place rename; `lifecycle/prevent-destroy` switched its recreate
trigger from `name` to `catalog_name`.
- Unit tests for `addParentMoves`, `followsParentRename`,
`Changes.HasOnlySingleReason` and the skipped internal-ID changes.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
@denik
denik removed this pull request from stack #7411 November 17, 2026 11:23
@denik
denik added this pull request to stack #7719 November 17, 2026 11:23
denik and others added 2 commits November 17, 2026 14:32
UC returns a catalog id (a UUID kept across renames, new on recreate) that the
API spec and SDK do not declare. The catalog adapter now calls the catalogs API
directly so it sees the id, records it in the state, and names it as the
internal ID: the plan finds a catalog renamed out of band like it finds schemas
and volumes. The test server returns and keeps the id too.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
denik and others added 11 commits November 17, 2026 14:32
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…DPLAN)

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…Catalog

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…model

Co-authored-by: Isaac <no-reply@databricks.com>
… rebase

Co-authored-by: Isaac <no-reply@databricks.com>
… review)

If a cloud run fails before the plan finds the renamed catalog, destroy looks at the old name and the catalog, with its schema and volume, would leak into the shared workspace.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants